
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IE和FF对于函数处理的差别</title>
</head>

<body>
	<pre style="background-color: lightBlue; margin: 40px auto;"><code>
		var func1 = function func2(){alert(100);}
																
		alert(func1); 										
		try{alert(func2);}catch(e){alert(e)} 	
		alert(typeof func1); 							
		alert(typeof func2); 							
	</code></pre>
	<script>
		var func1 = function func2(){alert(100);}
												//"_________FF:_________________________|________IE:_______________
		alert(func1); 							//"function func2(){alert(100);}"		|"function func2(){alert(100);}"
		try{alert(func2);}catch(e){alert(e)} 	// ReferenceError: func2 is not defined	|"function func2(){alert(100);}"
		alert(typeof func1); 					//"function"							|"function"
		alert(typeof func2); 					//"undefined"							|"function"
		
	</script>
</body>
</html>
